<template>
  <div style="margin-top: 20px">
    <van-list>
      <van-cell
          v-for="item in list"
          :key="item"
          :title="item"
          @click="selectAddress(item)"
      />
    </van-list>
  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import { useRouter } from 'vue-router';
  const value = ref('');
  const router = useRouter();
  const list = ref([
      '吉利南充工厂',
      '吉利新能源产业园',
      '西安吉利汽车产业园',
      '马来西亚AHTV产业园'
  ]);

  const selectAddress = (address: string) => {
    // console.log(address, '子');
    router.push({
      name: 'home',
      query: {
        address
      }
    });
  }

</script>

<style scoped lang="less">

</style>
